package com.dyx.event;

import java.util.EventObject;

/**
 * 定义一个 ValueChangedEvent, ValueChangedEvent用于在设置属性值的时候，触发事件。
 *
 * Value change event
 * https://teamlet.blog.csdn.net/article/details/42618733
 * @author dengyouxu
 * @date 2021.06.01 09:30:53:358
 */
public class ValueChangeEvent extends EventObject {

    /**
     *
     */
    private static final long serialVersionUID = 767352958358520268L;


    private int value;

    public ValueChangeEvent(Object source) {
        this(source, 0);
    }

    public ValueChangeEvent(Object source, int newValue) {
        super(source);
        value = newValue;
    }

    public int getValue() {
        return value;
    }
}